package com.hoperun.checkcloth.common

import android.app.Application
import android.content.Context
import android.content.Intent
import at.favre.lib.planb.BuildConfig
import at.favre.lib.planb.PlanB
import at.favre.lib.planb.full.CrashDetailActivity

class ClothCheckApp : Application() {

    companion object {
        lateinit var appContext: Context
    }

    override fun onCreate() {
        super.onCreate()
        appContext = this
        PlanB.get().init(true, PlanB.newConfig(this).applicationVariant(BuildConfig.BUILD_TYPE, BuildConfig.FLAVOR).build())
        PlanB.get().enableCrashHandler(this, PlanB.behaviourFactory().createStartActivityCrashBehaviour(Intent(this, CrashDetailActivity::class.java)))
    }

}